#include "ioc.h"
#include "fileop.h"
int buzz(unsigned int value)
{
    struct input_event event;
    event.type = EV_SND;
    event.code = SND_TONE;
    event.value = value;

    write2_file(BUZZER, &event);
    return 0;
}

void buz_on()
{
    buzz(1000);
    BUZZER_STATE = 1;
}

void buz_off()
{
    buzz(0);
    BUZZER_STATE = 0;
}